<script type="text/javascript">
    function formSubmit()
    {
    	var theform = document.customer_password;
    	
    	// Check Password
    	var currentPassword = theform.currentPassword.value;
    	if (currentPassword == ''){
			alert('Please enter your current password!');
			theform.currentPassword.focus();
			return false;
    	} 	

    	// Check NewPassword
    	var newPassword = theform.newPassword.value;
    	if (newPassword == ''){
			alert('Please enter your new password!');
			theform.newPassword.focus();
			return false;
    	} 	

    	// Check ReTypePassword
    	var reTypePassword = theform.reTypePassword.value;
    	if (reTypePassword == ''){
			alert('Your new password is mismatch. Please try again!');
			theform.reTypePassword.focus();
			return false;
    	} 	
    	else if(newPassword != reTypePassword)
    	{
    		alert('Your new password is mismatch. Please try again!');
			theform.reTypePassword.focus();
			return false;
    	}
    	
    	theform.actionForm.value = 'submit';
    	theform.submit();
    	return true;
    }
</script>
<h2>Welcome <{$username}>'s Account Panel</h2>
<form name="customer_password" action="<{$APPLICATION_URL}>/<{$ownerName}>MyAccount/changePassword" method="post">
<div class="contentContainer">
    <div>
    <div class="inputRequirement" style="float: right;">* Required information</div>
    <h2>Change Password</h2>	
  </div>

  <div class="contentText">
    <table border="0" width="100%" cellspacing="2" cellpadding="2">
      <tbody>
	  <{if $errorMessage != ""}>
	  <div class="inputRequirement"><{$errorMessage}></div>
	  <{/if}>
	  <tr>
        <td class="fieldKey">Current Password:</td>
        <td class="fieldValue"><input type="password" name="currentPassword" maxlength="40" value="">&nbsp;<span class="inputRequirement">*</span></td>
      </tr>
      <tr> 
        <td class="fieldKey">New Password:</td>
        <td class="fieldValue"><input type="password" name="newPassword" maxlength="40">&nbsp;<span class="inputRequirement">*</span></td>
      </tr>
      <tr> 
        <td class="fieldKey">Password Confirmation:</td>
        <td class="fieldValue"><input type="password" name="reTypePassword" maxlength="40">&nbsp;<span class="inputRequirement">*</span></td>
      </tr>
    </tbody></table>
  </div>
  <div class="buttonSet">
    <span class="buttonAction"><span class=""><div id="tdb5" type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-primary" role="button" aria-disabled="false" onclick="return formSubmit();"><span class="ui-button-icon-primary ui-icon ui-icon-triangle-1-e"></span>Update</div></span><script type="text/javascript">$("#tdb5").button({icons:{primary:"ui-icon-triangle-1-e"}}).addClass("ui-priority-primary").parent().removeClass("tdbLink");</script></span>
    <span class=""><a id="tdb6" href="<{$APPLICATION_URL}>/<{$ownerName}>MyAccount" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-secondary" role="button"><span class="ui-button-icon-primary ui-icon ui-icon-triangle-1-w"></span>Back</a></span><script type="text/javascript">$("#tdb6").button({icons:{primary:"ui-icon-triangle-1-w"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script>  </div>
</div>
<input type="hidden" id="actionForm" name="actionForm" value=""/>
</form>